package com.hippo4j.plugin.impl;

import com.hippo4j.plugin.ShutdownAwarePlugin;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.Executor;

@Slf4j
public class ThreadPoolExecutorShutDownPlugin implements ShutdownAwarePlugin {


    public static final String PLUGIN_NAME = "thread-pool-executor-shut-down-plugin";

    @Override
    public String getPluginId() {
        return PLUGIN_NAME;
    }

    @Override
    public void beforeShutdown(Executor executor) {
        log.info(">>>>>>>>>>>> " + executor.toString() + " beforeShutDown");
    }

    @Override
    public void afterShutdown(Executor executor) {
        log.info(">>>>>>>>>>>> " + executor.toString() + " afterShutDown");
    }
}
